﻿<%@ Page Title="Detalhes do Produto" Language="C#" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.cs" Inherits="Kakaroto.Administracao.Produto.Details" %>
<asp:Content runat="server" ContentPlaceHolderID="MainContent">
    <div>
		<p>&nbsp;</p>
      
        <asp:FormView runat="server"
            ItemType="Kakaroto.Models.Produto" DataKeyNames="Id"
            SelectMethod="GetItem"
            OnItemCommand="ItemCommand" RenderOuterTable="false">
            <EmptyDataTemplate>
                <div class="alert alert-danger" role="alert">
                       Não foi possível encontrar produto com este Id
                </div> 
            </EmptyDataTemplate>
            <ItemTemplate>
                <fieldset class="form-horizontal">
                    
							<div class="row">
								<div class="col-sm-2 text-right">
									<strong>Id</strong>
								</div>
								<div class="col-sm-4">
									<asp:DynamicControl runat="server" DataField="Id" ID="Id" Mode="ReadOnly" />
								</div>
							</div>
							<div class="row">
								<div class="col-sm-2 text-right">
									<strong>Categoria</strong>
								</div>
								<div class="col-sm-4">
									<%#: Item.Categoria != null ? Item.Categoria.Nome : "" %>
								</div>
							</div>
							<div class="row">
								<div class="col-sm-2 text-right">
									<strong>Nome</strong>
								</div>
								<div class="col-sm-4">
									<asp:DynamicControl runat="server" DataField="Nome" ID="Nome" Mode="ReadOnly" />
								</div>
							</div>
							<div class="row">
								<div class="col-sm-2 text-right">
									<strong>Preço (R$)</strong>
								</div>
								<div class="col-sm-4">
									<asp:DynamicControl runat="server" DataField="Preco" ID="Preco" Mode="ReadOnly" />
								</div>
							</div>
							
							<div class="row">
								<div class="col-sm-2 text-right">
									<strong>Descrição</strong>
								</div>
								<div class="col-sm-4">
									<asp:DynamicControl runat="server" DataField="Descricao" ID="Descricao" Mode="ReadOnly" />
								</div>
							</div>
							<div class="row">
								<div class="col-sm-2 text-right">
									<strong>Exibir</strong>
								</div>
								<div class="col-sm-4">
									<asp:DynamicControl runat="server" DataField="Exibir" ID="Exibir" Mode="ReadOnly" />
								</div>
							</div>
                 	<div class="row">
					  &nbsp;
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Voltar" CssClass="btn btn-default" />
						</div>
					</div>
                </fieldset>
            </ItemTemplate>
        </asp:FormView>
    </div>
</asp:Content>

